package com.starview.star.compiler.canonical;

import java.util.List;

import com.starview.platform.data.type.TypeUtils;

public class CanonUtils
{
  public static boolean isTuple(IContentExpression exp)
  {
    return exp instanceof ConstructorTerm && TypeUtils.isTupleLabel(((ConstructorTerm) exp).getLabel());
  }

  public static List<IContentExpression> constructorArgs(IContentExpression exp)
  {
    assert exp instanceof ConstructorTerm;

    return ((ConstructorTerm) exp).getElements();
  }
}
